﻿using Boardgame;
using BoardgameModelViewed;
using BoardgameModel;
using System;
using System.Collections.Generic;


namespace ChessBench
{
    class Moves01
    {
        static void Main ()
        {
            ChessModel game = new ChessModel (3, 0, 2, 6);

            Rook rook = new Rook (Player.White);

            game.Put (rook, 0, 0);
            game.Put (new Rook (Player.White), 6, 0);
            game.Put (new Rook (Player.Black), 7, 7);
            game.Put (new Rook (Player.White), 1, 0);

            Console.WriteLine ("Board initialized:");
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);

            bool isOcc1 = game.Board[0, 0].IsOccupied;
            bool isOcc2 = game.Board[1, 0].IsOccupied;

            game.MakeMove (0, 0, 0, 6);
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);

            game.MakeMove (2, 6, 3, 7);
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);

            game.MakeMove (6, 0, 6, 7);
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);

            game.MakeMove (7, 7, 6, 7);
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);

            game.MakeMove (1, 0, 1, 7);
            Console.WriteLine (game.Board.ToString ());
            Console.WriteLine ("Plies=" + game.Plies.ToString ());
            Console.WriteLine ("Status={0}\n", game.Status);
        }
    }
}
